package com.hnevc.cnlizhimaomxbc;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

public class HomeActivity extends AppCompatActivity {
    private ImageView home_tu;
    private ImageView order_tu;
    private ImageView indent_tu;
    private ImageView mine_tu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_homepage);
        initView();
        initData();
        initEvent();
    }
    private void initView(){
        home_tu = (ImageView) findViewById(R.id.home_tu);
        order_tu = (ImageView) findViewById(R.id.order_tu);
        indent_tu = (ImageView) findViewById(R.id.indent_tu);
        mine_tu = (ImageView) findViewById(R.id.mine_tu);

    }
    private void initData(){

    }
    private void initEvent(){
        order_tu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(HomeActivity.this, EatActivity.class);
                startActivityForResult(intent,1);
            }
        });
        indent_tu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(HomeActivity.this, DinActivity.class);
                startActivityForResult(intent,1);
            }
        });
        mine_tu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(HomeActivity.this, MeActivity.class);
                startActivityForResult(intent,1);
            }
        });

    }
}
